<cfcomponent output="false">
	
	<!--- --->

	<cffunction name="loadWorksheet" access="public" output="true" returntype="boolean">
		<cfargument name="worksheetID" required="true" />

		<cflocation url="#$.site.getVar('rootURL')#/craftivity/worksheets.cfm?worksheetID=#arguments.worksheetID#" addToken="no" />
		
		<cfreturn true />
			
	</cffunction>
	
	<!--- --->
	
	<cffunction name="saveWorksheetField" access="public" output="true" returntype="boolean">
		<cfargument name="worksheetFieldID" required="true" />
		<cfargument name="worksheetID" required="true" />
		<cfargument name="value" required="true" />
		<cfargument name="type" required="true" />
		
		<cfset var local = {} />
		
		<cfif arguments.type eq 1> <!--- get rid of delimeter commas --->
			<cfset arguments.value = rereplace(arguments.value,',|,','|','ALL') />
			<cfset arguments.value = rereplace(arguments.value,',|','','ALL') />
		</cfif>

		<!--- <cfset application.s.worksheetService.saveWorksheetFieldUser(argumentCollection=arguments) /> --->
		<cfset $.run.it('worksheetService.saveWorksheetFieldUser',arguments) />

		<cflocation url="#$.site.getVar('rootURL')#/craftivity/worksheets.cfm?worksheetID=#arguments.worksheetID#" addToken="no" />
		
		<cfreturn true />
			
	</cffunction>
	
	<!--- --->
	
	<cffunction name="saveTheWorksheet" access="public" output="true" returntype="boolean">
		<cfargument name="worksheetID" required="true" />
		
		<cfset var local = {} />

		
		<!--- <cfset local.worksheetID = application.s.worksheetService.saveTheWorksheet(argumentCollection=arguments) /> --->
		<cfset local.worksheetID = $.run.it('worksheetService.saveTheWorksheet',arguments) />
		
		<cflocation url="#$.site.getVar('rootURL')#/craftivity/worksheet_designer.cfm?worksheetID=#local.worksheetID#" addToken="no" />
		
		<cfreturn true />
			
	</cffunction>
	
	<!--- --->
	
	<cffunction name="saveTheWorksheetField" access="public" output="true" returntype="boolean">
		<cfargument name="worksheetID" required="true" />
		<cfargument name="worksheetFieldID" required="true" />
		
		<cfset var local = {} />
		
		<!--- <cfset application.s.worksheetService.saveTheWorksheetField(argumentCollection=arguments) /> --->
		<cfset $.run.it('worksheetService.saveTheWorksheetField',arguments) />
		
		<cflocation url="#$.site.getVar('rootURL')#/craftivity/worksheet_designer.cfm?worksheetID=#arguments.worksheetID#" addToken="no" />
		
		<cfreturn true />
			
	</cffunction>
	
	<!--- --->
	
	<cffunction name="deleteWorksheet" access="public" output="true" returntype="boolean">
		<cfargument name="worksheetID" required="true" />
		
		<cfset var local = {} />
		
		<!--- <cfset application.s.worksheetService.deleteWorksheet(argumentCollection=arguments) /> --->
		<cfset $.run.it('worksheetService.deleteWorksheet',arguments) />
		
		<cflocation url="#$.site.getVar('rootURL')#/craftivity/worksheet_designer.cfm?" addToken="no" />
		
		<cfreturn true />
			
	</cffunction>
	
	<!--- --->
	
	<cffunction name="deleteWorksheetField" access="public" output="true" returntype="boolean">
		<cfargument name="worksheetFieldID" required="true" />
		<cfargument name="worksheetID" required="true" />
		
		<cfset var local = {} />
		
		<!--- <cfset application.s.worksheetService.deleteWorksheetField(argumentCollection=arguments) /> --->
		<cfset $.run.it('worksheetService.deleteWorksheetField',arguments) />
		
		<cflocation url="#$.site.getVar('rootURL')#/craftivity/worksheet_designer.cfm?worksheetID=#arguments.worksheetID#" addToken="no" />
		
		<cfreturn true />
			
	</cffunction>
	
	<!--- --->
	
</cfcomponent>